VideoRecording: Complete refactor from Tutorial with instructional/podcast flags#1228
Merged
VideoRecording: Complete refactor from Tutorial with instructional/podcast flags#1228
Conversation
d1cbee0 to
ee7b6f3
Compare
ee7b6f3 to
feb2e00
Compare
feb2e00 to
6733078
Compare
maebeale
commented
Mar 9, 2026
| <%= @tutorial.rhino_body %> | ||
| <div class="prose leading-relaxed text-gray-800 text-left text-start pb-10 mb-10"> | ||
| <%= @video_recording.rhino_body %> | ||
| </div> |
Collaborator
Author
There was a problem hiding this comment.
not sure we want this wrapper div?
af1a6ce to
bc36ff5
Compare
- Rename tutorials table to recordings via migration - Add is_tutorial (default: true) and is_podcast (default: false) columns - Rename Tutorial model to Recording with backwards-compatibility alias - Add scopes: .tutorials (is_tutorial: true), .podcasts (is_podcast: true) - Rename TutorialsController to RecordingsController - Add video_library action for all recordings - Index action filters to is_tutorial: true only - Update routes: resources :recordings, /tutorials redirects to index, /video_library route - Rename home VideoGalleryController to VideoLibraryController, update to use Recording - Rename and update views: tutorials → recordings, video_gallery → video_library - Rename and update policy: TutorialPolicy → RecordingPolicy - Rename and update factory: tutorial → recording, add :tutorial/:podcast/:both traits - Help menu shows Tutorials (is_tutorial: true) - Community menu shows Video Library (all recordings) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Update all views: recordings/_form, _search_boxes, _tutorial, _video_card, edit, index, index_lazy, new, show - Replace @tutorial with @recording, tutorial[...] with recording[...], edit_tutorial_path with edit_recording_path - Add is_tutorial and is_podcast checkboxes to form (admin section) - Update navigation menus: - Help: Tutorials link uses Recording model name (Tutorials) - Community: Add "Video Library" link pointing to video_library_path - Update both desktop and mobile navbars - Update i18n: add Recording model names, keep Tutorial alias - Fix Cancel link to use recordings_path Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename model Recording → YoutubeVideo (self.table_name = 'youtube_videos') - Rename controller RecordingsController → YoutubeVideosController - Rename policy RecordingPolicy → YoutubeVideoPolicy - Rename factory recordings.rb → youtube_videos.rb - Rename views app/views/recordings → app/views/youtube_videos - Update migration class name - Update all references: Recording → YoutubeVideo, recording → youtube_video, @recording → @youtube_video - Keep backwards-compatibility alias: Tutorial = YoutubeVideo - Keep i18n entries for Tutorial alias Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Desktop navbar: Video Library → Video Gallery - Mobile navbar: Video Library → Video Gallery - Route and controller remain as video_library (internal naming) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename YoutubeVideo → VideoRecording throughout codebase - Update migration: tables/indexes named video_recordings - Update controller video_library action to exclude tutorials (is_tutorial: false) - video_library shows all content EXCEPT tutorials (Video Gallery) - index shows only tutorials (Tutorials under Help) - Keep i18n singular as 'Video' Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename migration file: rename_tutorials_to_recordings → rename_video_recordings - Matches class name RenameVideoRecordings Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… reorganize views - Rename Tutorial model to VideoRecording with self.table_name = 'video_recordings' - Add is_tutorial and is_podcast boolean flags with scopes (default: true, false) - Rename views directory from tutorials to video_recordings per Rails conventions - Migrate VideoRecordingsController with index (tutorials only) and video_library actions - Update routes: /video_recordings (main), /tutorials (alias), /video_library (action) - Add VideoGalleryController under home namespace to show non-tutorials on home page - Update navigation: Help section shows "Tutorials", Community shows "Video Gallery" - Update i18n: Tutorial.model_name → "Video" (singular), "Tutorials" (plural) - Add 13 diverse seed records covering all flag combinations for testing Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix RuboCop style violations: change single quotes to double quotes - Update tutorial_spec.rb to use VideoRecording model instead of Tutorial - Update tutorials_routing_spec.rb to test VideoRecordingsController routing - Fix Tag model reference from Tutorial to VideoRecording - All tests and linting should now pass Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed source_type from 'Tutorial' to 'VideoRecording' in User model to match the renamed model. This fixes the NameError in test suite when accessing User#bookmarked_tutorials association. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…ndex
- Add video_type parameter support ('all', 'tutorials', 'not_tutorials')
- Merge video_library action into index with parameter-based filtering
- Add video_type dropdown filter in search UI
- Hide search boxes when video_type=tutorials parameter is set
- Update navigation links to pass appropriate query parameters:
- Community > Video Gallery links with video_type=not_tutorials
- Help > Tutorials links with video_type=tutorials&hide_search=true
- Update view to show different titles based on video_type
- Preserve video_type parameter in search form and clear filters link
- Add filter_by_video_type helper method to controller
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add video type dropdown as first filter in the search form - Remove duplicate hidden field (select field handles the parameter) - Update layout to match other filter fields - Dropdown auto-submits on change to apply filter immediately Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix references to Tutorial model (use VideoRecording) - Customize message based on video_type filter - Show appropriate no results message for tutorials vs video gallery Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Change home_video_gallery_index_path to home_video_recordings_index_path - Reflects renamed home video_recordings controller Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…o_recordings_index_path - The correct path helper for resources :video_recordings is home_video_recordings_path - _index suffix is not added for RESTful resource routes by default Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Update home/video_recordings/index view to use @video_recordings variable - Change partial from tutorials/video_card to video_recordings/video_card - Update video_card partial to use video_recording variable instead of tutorial - Fix "Browse all videos" link to video_recordings_path with video_type filter - Fixes "Oopsie!" error on home page video gallery Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… sentence case WindowsType
…recordings routes only
…sition_column call
- Removed link from subtitle paragraph - Added link to top-right section, only shown in instructional videos mode - Link directs to non-instructional videos view Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Use bg-cyan-100 for instructional videos instead of bg-cyan-50 for better visual distinction Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Remove video_type param so link shows all videos instead of just 'other' Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Use skip_confirmation! on User and Person models to prevent Devise from attempting to send confirmation instructions during db:seed/db:dev:seed tasks. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add skip_confirmation = true when creating users that don't initially have confirmed_at set. This prevents Devise from attempting to send confirmation instructions during db:seed/db:dev:seed, which was causing mailer errors. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add presence validation to ensure youtube_url is required when creating or updating VideoRecording records. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Replace hardcoded 'VideoRecording' strings with VideoRecording.model_name.human
so messages use the translated name ('Video') from en.yml configuration.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Remove invalid skip_confirmation attribute assignments. Instead, set Devise.mailer to NullMailer during seeding to prevent confirmation emails from being sent, then restore it at the end of seeding. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Pass video_type: 'all' parameter so the video type dropdown defaults to 'All videos' when clicking from the instructional videos page. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Use video_recordings domain theme color instead of resources color. Use darker intensity (100) for instructional videos, lighter (50) for others. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Use video_card partial for consistent card-based layout (3-column grid) - Add Edit and View buttons to the left of bookmark button on cards - Apply home page card styling (rounded-xl, shadow-sm, hover effects) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Keep card styling but revert to 2-column layout for better use of screen space. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Stack buttons vertically on the right: Edit, Bookmark, View - Allows title to extend further right - Bookmark button is now thinner without View button beside it Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Bookmark button at top - Edit and View buttons below, side by side - Matches screenshot layout Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- View and Bookmark buttons side by side on top - Edit button below - Better use of space with admin-only edit row Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Remove invalid Devise.mailer = "NullMailer" which was causing seed failures. Keep ActionMailer::Base.perform_deliveries = false which is sufficient to prevent email delivery without trying to swap out mailer classes. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Update top utility link from 'Video gallery' to 'Videos' - Update back button from '← Video gallery' to '← Videos' - Change both links from video_type: 'other' to video_type: 'all' Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add confirmed_at = Time.current to all User creation blocks to prevent Devise from triggering confirmation callbacks during seeding - Add missing windows_type_id and author_credit_preference to WorkshopVariation seed data to satisfy validations Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…d fields Use find_or_initialize_by to ensure all required fields (windows_type_id, author_credit_preference) are set for both new and existing workshop variations. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Change tutorials_path to video_recordings_path in form URL - Update model class references from Tutorial to VideoRecording Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2d20433 to
bf2064b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete refactor of the Tutorial model to VideoRecording with boolean flags for flexible content categorization. Implements semantic parameter naming with
is_instructionalandis_podcastflags. Help menu displays instructional videos, Community menu shows Video Gallery with general videos.Key Changes
Model & Database
tutorialstable tovideo_recordingsis_instructionalboolean flag (default: false for most, true for 2 instructional videos)is_podcastboolean flag (default: false)Controllers & Routes
TutorialsController→VideoRecordingsControllervideo_libraryaction into RESTfulindexaction with parametersvideo_typeparameter:instructional→ showsis_instructional: truevideos (Help menu)other→ showsis_instructional: falsevideos (Community menu)all→ shows all videosViews & UI
tutorials/→video_recordings/spec/views/tutorials/→spec/views/video_recordings/Controllers, Models & Services
plain_text_bodyinstead of raw HTMLData & Seeds
is_instructional: true(educational content)is_instructional: false(general/reference content)Tests
spec/views/tutorials/*.rb→spec/views/video_recordings/*.rbTest Plan
db:migrateis_instructional: truevideosis_instructional: falsevideosis_instructionalandis_podcastflagsdb:seedbundle exec rspec🤖 Generated with Claude Code